package com.wang.action;

import com.wang.entity.TbBbsLetter;
import com.wang.response.ResultResponse;
import com.wang.service.TbBbsLetterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/bbs")
public class BbsLeterAction {
    /*
 发送
 */
    @Autowired
    private TbBbsLetterService tbBbsLetterService;
 @PostMapping("insertbbsletter")
  private ResultResponse insertbbsletter(@RequestBody TbBbsLetter tbBbsLetter) throws Exception {
   return this.tbBbsLetterService.insertbbsletter(tbBbsLetter);
    }

    /*
     删除
     */
    @PostMapping("removebbsletter")
    private ResultResponse removebbsletter(@RequestBody TbBbsLetter tbBbsLetter){
        return this.tbBbsLetterService.removebbsletter(tbBbsLetter);
    }
}
